package com.kingmed.kmss.framework.feign.client.admin;


import com.kingmed.kmss.common.dto.admin.sys.SysMsgCreateDTO;
import com.kingmed.kmss.common.dto.admin.sys.SysMsgDTO;
import com.kingmed.kmss.common.dto.admin.ums.*;
import com.kingmed.kmss.common.exception.InternalApiException;
import com.kingmed.kmss.common.qc.admin.AdminQC;
import com.kingmed.kmss.common.vo.CommonResponse;
import com.kingmed.kmss.common.vo.admin.SysBpmnConfigVO;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import java.util.List;
import java.util.Map;

@Component
public class CommonAdminFeignFallbackService implements CommonAdminFeignService {

    @Override
    public CommonResponse<List<OrganizationDTO>> getParentUpByAdminId(Long adminId) {
        throw new InternalApiException("admin service: 获取组织信息失败");
    }

    @Override
    public CommonResponse<AdminDTO> getByUsername(String userName) {
        throw new InternalApiException("admin service: 获取用户信息失败");
    }

    @Override
    public CommonResponse<List<AdminDTO>> listByUsername(List<String> usernameList) {
        throw new InternalApiException("admin service: 根据用户名获取用户信息失败");
    }

    @Override
    public CommonResponse<List<BpmnMembershipDTO>> queryList(BpmnQueryDTO queryQc) {
        throw new InternalApiException("admin service: 获取审批角色相关信息失败");
    }

    @Override
    public String getOrgAndChild(Long orgId) {
        throw new InternalApiException("admin service: getOrgAndChild失败");
    }

    @Override
    public CommonResponse<List<AdminDTO>> queryByCondition(AdminQC userQC) {
        throw new InternalApiException("admin service: 获取组织信息失败");
    }

    @Override
    public CommonResponse<AdminDTO> loadById(Long id) {
        throw new InternalApiException("admin service: 获取用户信息失败");
    }

    @Override
    public OrganizationDTO queryOrgById(Long orgId) {
        throw new InternalApiException("admin service: 获取组织信息失败");
    }

    @Override
    public CommonResponse<OrganizationTileDTO> getGroupRegionBranchByAdminId(Long adminId) {
        throw new InternalApiException("admin service: getGroupRegionBranchByAdminId失败");
    }

    @Override
    public CommonResponse<UmsKmcsOrgDTO> kmcsOrgDetail(String orgId) {
        throw new InternalApiException("admin service: kmcsOrgDetail失败");
    }

    @Override
    public CommonResponse<List<UmsKmcsOrgDTO>> kmcsOrgList(Integer level) {
        throw new InternalApiException("admin service: kmcsOrgList失败");
    }

    @Override
    public CommonResponse<List<AdminDTO>> queryBatchByEmployee(List<String> adminIdList) {
        throw new InternalApiException("admin service: queryBatchByEmployee失败");
    }

    @Override
    public CommonResponse<List<AdminDTO>> queryBatchByAdminIdList(List<String> adminIdList) {
        throw new InternalApiException("admin service: queryBatchByAdminIdList失败");
    }

    @Override
    public CommonResponse<Boolean> createMsg(SysMsgCreateDTO sysMsgDTO) {
        throw new InternalApiException("admin service: createMsg失败");
    }

    @Override
    public CommonResponse<Boolean> markMsgAsReadForBusiness(@Valid SysMsgDTO sysMsgDTO) {
        throw new InternalApiException("admin service: markMsgAsReadForBusiness失败");
    }

    @Override
    public CommonResponse<Boolean> createBatchMsg(List<SysMsgCreateDTO> sysMsgList) {
        throw new InternalApiException("admin service: createBatchMsg失败");
    }

    @Override
    public CommonResponse<List<AdminDTO>> fuzzyQueryAllByName(String username) {
        throw new InternalApiException("admin service: fuzzyQueryAllByName失败");
    }

    @Override
    public CommonResponse<AdminDTO> getUserById(String id) {
        throw new InternalApiException("admin service: getUserById失败");
    }

    /**
     * 组织ID获取全部子公司：有权限看到的所有子公司
     *
     * @param orgId
     * @return
     */
    @Override
    public CommonResponse<List<OrganizationDTO>> getBranchesByOrgId(Long orgId) {
        throw new InternalApiException("admin service: getBranchesByOrgId失败");
    }

    @Override
    public CommonResponse<List<OrganizationDTO>> getBranchesByAdminId(Long adminId) {
        throw new InternalApiException("admin service: getBranchesByAdminId失败");
    }

    /**
     * 通过子公司名称查询子公司信息, 通过大区名称查询大区信息
     *
     * @param branchName
     * @param regionName
     */
    @Override
    public CommonResponse<List<OrganizationDTO>> getOrgByName(String branchName, String regionName) {
        throw new InternalApiException("admin service: getOrgByName失败");
    }

    /**
     * 根据员工号获取相关的信息（角色权限），用于对外接口的数据权限控制
     * @param adminLoginDto
     * @return
     */
    @Override
    public CommonResponse<AdminAuthDTO> loadAdminAuthDtoByUsernameNew(AdminLoginDTO adminLoginDto) {
        throw new InternalApiException("admin service: loadAdminAuthDtoByUsernameNew失败");
    }

    /**
     * 根据orgId获取子公司信息
     *
     * @param orgId
     * @return
     */
    @Override
    public CommonResponse<OrganizationDTO> getBranch(Long orgId) {
        throw new InternalApiException("admin service: getBranch失败");
    }

    /**
     * 根据orgIds批量获取子公司信息
     *
     * @param orgIds
     * @return
     */
    @Override
    public CommonResponse<Map<Long, OrganizationDTO>> getOrgByIds(List<Long> orgIds) {
        throw new InternalApiException("admin service: getOrgByIds失败");
    }

    /**
     * 根据所属子公司id获取所属大区
     *
     * @param branchId
     * @return
     */
    @Override
    public CommonResponse<OrganizationDTO> getRegionByBranchId(Long branchId) {
        throw new InternalApiException("admin service: getRegionByBranchId失败");
    }

    /**
     * 获取所有大区
     *
     * @return
     */
    @Override
    public CommonResponse<List<OrganizationDTO>> getRegions() {
        throw new InternalApiException("admin service: getRegions失败");
    }

    /**
     * 获取所有子公司
     *
     * @return
     */
    @Override
    public CommonResponse<List<OrganizationDTO>> getAllBranch() {
        throw new InternalApiException("admin service: getAllBranch失败");
    }

    /**
     * 生成流水号
     * @param bizKey
     * @param len
     * @param step
     * @return
     */
    @Override
    public CommonResponse<String> genNextVal(String bizKey, Integer len, Integer step) {
        throw new InternalApiException("admin service: genNextVal失败");
    }

	@Override
	public CommonResponse<List<UmsKmcsOrgDTO>> listByLevels(List<Integer> levels) {
		throw new InternalApiException("admin service: listByLevels获取组织信息失败");
	}

	@Override
	public CommonResponse<List<AdminDTO>> listEmployeeNum(List<String> employeeNumList) {
		throw new InternalApiException("admin service: listEmployeeNum获取员工列表失败");
	}

    @Override
    public CommonResponse<SysBpmnConfigVO> getBpmnConfigByCompanyId(Long companyId) {
        throw new InternalApiException("admin service: getByCompanyId获取审批配置失败");
    }

}
